package com.yllt4cloud.base.biz.control;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yllt4cloud.base.api.entity.RoomRegion;
import com.yllt4cloud.base.biz.service.IRoomRegionService;
import com.yllt4cloud.common.core.util.ResultResp;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: yaoxj
 * @create: 2020-01-08 17:19
 **/
@RestController
@AllArgsConstructor
@RequestMapping("baseRoomRegion")
public class RoomRegionControl {

    IRoomRegionService roomRegionService;

    @RequestMapping(value="queryRoomRegion")
    public ResultResp<?> queryRoomRegion(){
        return ResultResp.success(roomRegionService.list(Wrappers.<RoomRegion>query().lambda()
                .eq(RoomRegion::getIsDelete, 0)));
    }
}
